//
//  BMPhotoIOVideoModel.m
//  bigmama
//
//  Created by huyuchen on 2017/9/28.
//  Copyright © 2017年 盛成文化. All rights reserved.
//

#import "BMPhotoIOVideoModel.h"
#import "BMPhotoIOTool.h"

@implementation BMPhotoIOVideoModel

- (NSString *)durationStr{
    if (!_durationStr.length) {
        _durationStr = [self timeFormatted:(int)_duration];
    }
    return _durationStr;
}

- (NSString *)timeFormatted:(int)totalSeconds
{
    
    int seconds = totalSeconds % 60;
    int minutes = (totalSeconds / 60) % 60;
    //    int hours = totalSeconds / 3600;
    
    return [NSString stringWithFormat:@"%02d:%02d", minutes, seconds];
}

+ (id)camerModel{
    BMPhotoIOVideoModel *model = [[BMPhotoIOVideoModel alloc] init];
    model.type = BMPhotoIOVideoTypeCamera;
    return model;
}

@end
